1. Field of the Invention
The present invention relates to a communication device and related packet processing method, and more particularly, to a communication device and related packet processing method for accelerating packet processing speed.
2. Description of the Prior Art
Link aggregation, link bundling, Ethernet/network/NIC bonding, or NIC teaming are computer networking umbrella terms to describe various methods of combining (aggregating) multiple network connections in parallel to increase throughput beyond what a single connection could sustain, and to provide redundancy in case one of the links fails. Aggregation can be implemented at any of the lowest three layers of the OSI model. Examples of aggregation at layer 1 are power line (e.g. IEEE 1901) and wireless (e.g. IEEE 802.11) network devices that combine multiple frequency bands into a single wider one. Layer 2 (data link layer, e.g. Ethernet frame in LANs or multi-link Point-to-Point Protocol in WANs) aggregation typically occurs across switch ports, which can be either physical ports, or virtual ones managed by an operating system. Aggregation is also possible at layer 3 in the OSI model, i.e. at the network layer (e.g. Internet Protocol or Internetwork Packet Exchange), using round-robin scheduling, or based on hash values computed from fields in the packet header, or a combination of these two methods. Regardless of the layer on which aggregation occurs, the network load is balanced across all links. Most methods provide failover/redundancy as well.
Taking the Wireless Local Area Network for example, frame aggregation is a feature of the IEEE 802.11e and 802.11n WLAN standards that increases throughput by sending two or more data frames within a single transmission. Every frame transmitted by an 802.11 device has a significant amount of overhead, including radio level headers, Media Access Control (MAC) frame fields, interframe spacing, and acknowledgment of transmitted frames. At the highest data rates, the overhead can consume more bandwidth than the payload data frame. To address this issue, the 802.11n standard defines two types of frame aggregation: MAC Service Data Unit (MSDU) aggregation and MAC Protocol Data Unit (MPDU) aggregation. Both types group several data frames into one large frame. Because management information needs to be specified only once per frame, the ratio of payload data to the total volume of data is higher, which achieves higher throughput.
In the Aggregated MAC Service Data Unit (A-MSDU) scenario, multiple Ethernet packets with the same destination and quality of Service (QoS) profile will be conjoined together and sent when a transmitter gets access to a medium. However, the trouble is if it comes to a noisy channel, there is a higher chance of a collision, and the A-MSDU has only one Cyclic Redundancy Check (CRC) or checksum; therefore, the transmitter has to retransmit the whole aggregated packet again.
On the other hand, in the Aggregated MAC Protocol Data Unit (A-MPDU) scenario, a transmitter end conjoins packets as 802.11 packets, which means if there is a collision, the individual packet can be retransmitted since the A-MPDU have individual MAC headers and CRC's corresponding to each packet, and each packet is allowed to be individually acknowledged as well. In such a situation, packet reordering is required in the receiver end since some packets may be lost due to the interference of the media and would be retransmitted again by the transmitter end.
Moreover, sliding window protocol is a feature of packet-based data transmission protocols, the sliding window protocol is used where reliable in-order delivery of packets is required, such as in the Data Link Layer (OSI model) as well as in the Transmission Control Protocol (TCP). Conceptually, each sub-packet of the transmission is assigned a unique consecutive sequence number, and the receiver uses the numbers to place received packets in the correct order, discarding duplicate packets and identifying missing ones.
Please refer to FIG. 1, which is a schematic diagram illustrating packets transmission in a communication network 10. In FIG. 1, communication devices S, A and B transmit and receive packets based on the A-MPDU and the sliding window protocol in the communication network 10. The communication devices S, A and B may be identical or different communication devices with a wired or a wireless communication function, such as a server, an access point or a personal computer. In detail, the communication device S serves as a packet source for aggregating two packet streams PA and PB respectively destined to the communication devices A and B into aggregated packets PAB, and transmitting the aggregated packets PAB to the communication device B. Each sub-packet of the aggregated packets PAB is assigned a unique consecutive number, e.g. 0, 1, 2 and so on. The communication device B serves as a receiver as well as a bridge for extracting the packets PB from the aggregated packets PAB, and passing the packets PA to the communication device A. The communication device A serves as a receiver for simplicity.
Traditionally, the communication device B receives the aggregated packets PAB via a network interface 12, and a Direct Memory Access (DMA) 14 transfers the received aggregated packets PAB from the network interface 12 to a processing module 11. The processing module 11 unwraps the ordered aggregated packet stream PAB, performs reordering on the aggregated packets PAB, extracts the packets PB for further processing, aggregates the packets PA and numbers the aggregated packets PA with new sequence numbers. Then, a DMA 15 transfers the aggregated packets PA to a network interface 13 to transmit the aggregated packets PA to the communication device A accordingly.
As can be seen, operations of processing the packets PAB, PA, PB are mainly handled by the processing module 11, which leads to heavy operating activities and high power consumption of the processing module 11. Besides, the communication device B is a bridge for passing the packets PA while wasting resources on handling the packets PA, which also reduces a processing efficiency of the processing module 11. As a result, there is a need to improve the prior art to reach better processing efficiency of the processing module and shorten the time for passing the packets.